package com.kaifamiao.array;

import java.util.Arrays;

public class PandaTest2 {

	public static void main(String[] args) {
		
		Panda[] pandas = new Panda[ 5 ];
		System.out.println( Arrays.toString( pandas ) );
		
		pandas[ 0 ] = new Panda( "团团" , '男' , 25000 , 120 );
		pandas[ 1 ] = new Panda( "圆圆" , '女' , 30000 , 140 );
		pandas[ 2 ] = new Panda( "和和" , '男' , 24000 , 110 );
		pandas[ 3 ] = new Panda( "美美" , '女' , 32000 , 130 );
		pandas[ 4 ] = new Panda( "熊猫儿" , '男' , 20000 , 108 );
		
		System.out.println( Arrays.toString( pandas ) );
		
		Arrays.sort( pandas );
		
		System.out.println( Arrays.toString( pandas ) );

	}

}
